﻿//
// Created: 2018/9/27
// Author: chenqiang
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xproject.Framework.Core;
using System.ComponentModel.DataAnnotations.Schema;

namespace Model.WXshopBuiness
{
    /// <summary>
    /// 某用户对某一个产品发起的砍价活动
    /// </summary>
    public class  UserProductKanJia:IEntity
    {
    
       ///<summary>
       ///砍价ID (唯一：每个用户对每个产品有个唯一的砍价ID)
       ///<summary>
       public string KanJiaID  { get; set; } 
       ///<summary>
       ///活动ID
       ///<summary>
       public string PromotionID  { get; set; } 
       ///<summary>
       ///产品id
       ///<summary>
       public string ProductID  { get; set; } 
       ///<summary>
       /// 用户ID
       ///<summary>
       public string UserID  { get; set; } 
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
       ///<summary>
       /// 创建时间
       ///<summary>
        public DateTime CreateTime  { get; set; } 
       ///<summary>
       ///截止时间
       ///<summary>
       public DateTime DeadLineTime  { get; set; } 
       ///<summary>
       /// 砍价最多允许次数
       ///<summary>
       public int MaxKanJiaCount  { get; set; } 
       ///<summary>
       ///砍价分享描述
       ///<summary>
       public string KanJiaDesc  { get; set; } 
       ///<summary>
       ///已经参与砍价的次数
       ///<summary>
       public int AlreadKanJiaCount  { get; set; } 
        /// <summary>
        /// 已经获得了多少砍价的钱
        /// </summary>
        public decimal AleradKanJiaMoney { get; set; }
       ///<summary>
       /// 每次砍价最大的砍掉的钱
       ///<summary>
       public decimal EachKanJiaMaxMoney  { get; set; } 
       ///<summary>
       /// 最多允许砍的钱
       ///<summary>
       public decimal MaxKanJiaMoney  { get; set; } 
       /// <summary>
       /// 归属那个订单 ？
       /// </summary>
       public string OrderId { get; set; }
        /// <summary>
        /// 是否已使用 0 没被使用 1 已被使用
        /// </summary>
       public int IsUsed { get; set; }
    
       [NotMapped]
        public long Id { get; set; }

        [NotMapped]
        public EntityState EntityState { get; set; }

        public int CompareTo(object obj)
        {
            throw new NotImplementedException();
        }
    }
}